package com.thread.lock;

import java.util.concurrent.locks.LockSupport;

public class TestMainLockSupport {

	public static void main(String[] args) {

		//Test 1
//		TestCase1();
		
		//Test 2
		TestCase2();
		
	}
	
	private static void TestCase1(){
		LockSupport.park();
		System.out.println("blocked");
	}

	
	private static void TestCase2(){
		LockSupport.unpark(Thread.currentThread());
		LockSupport.park();
		System.out.println("unblocked1");
		LockSupport.park();
		System.out.println("unblocked2");
	}
}
